import { View } from "../../../mvc/core/View";
import { LayerManager } from "../../manager/LayerManager";
import { HighlightManager } from "../../manager/HighlightManager";
import { ObjCreate } from "../common/ObjCreate";
import { ResFileConst } from "../../resource/ResFileConst";
import { Language } from "../../../../extend/language/Language";
import { Dispatcher } from "../../../mvc/core/Dispatcher";
import { DataEvent } from "../../events/DataEvent";
import { EventName } from "../../mvc/EventName";
import { EffectManager } from "../../manager/EffectManager";
import { GLoadedButton } from "../../../../com/mui/controls/GLoadedButton";
//class PrizeFallHintBtn
    
    export  class PrizeFallHintBtn extends View
    {
        constructor()
        {
            super();
            this.layer = LayerManager.rightTopUILayer;
            this.createChildren();
            this.addListeners();
            return;
        }

        public highLight(): void
        {
            HighlightManager.instance.glowEffectButton(this._prizeFallBtn, true);
            return;
        }

        /* internal  */createChildren(): void
        {
            this._prizeFallBtn = ObjCreate.createGLoadedButton(ResFileConst.PrizeFallHintBtn, 0, 0, 60, 50, this);
            return;
        }

        /* internal  */addListeners(): void
        {
            this._prizeFallBtn.addEventListener(flash.events.MouseEvent.CLICK, this.onPrizeFallClick);
            return;
        }

        protected onPrizeFallClick(arg1: Object /* flash.events.MouseEvent */): void
        {
            var loc1=Language.getString(70751);
            Dispatcher.dispatchEvent(new DataEvent(EventName.PrizeFallShowModule, loc1));
            return;
        }

        public /* override */ hide(): void
        {
            super.hide();
            EffectManager.glowFilterUnReg(this);
            return;
        }

        /* internal */ /* var */_prizeFallBtn: GLoadedButton;
    }
